//
//  AppDelegate.m
//  sharedBooks
//
//  Created by XunFengKJ on 2016/11/9.
//  Copyright © 2016年 XunFengKJ. All rights reserved.
//

#import "AppDelegate.h"
#import "AppDelegate+AppService.h"
#import "AppDelegate+PushService.h"
#import "SBCheckVersionUpdate.h"

@interface AppDelegate ()
@property(strong,nonatomic)SBCheckVersionUpdate* check;
@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    //初始化Window
    [self initWindow];
    //配置第三方
    [self configThirdParty];
    //判断登录状态
    [self jugdeLoginStatus];
    // 初始化APNs
    [self initAPNsWithLaunchOptions:launchOptions];
    //改变状态栏颜色
    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
    
    return YES;
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    self.check = [[SBCheckVersionUpdate alloc] init];
    //更新接口
    [self.check postUpdateVerson];
}

@end
